package cbh.tool.scheduler.domain;


import cbh.tool.entity.MySchedulerTaskEntity;
import cbh.tool.scheduler.core.RestTaskExecute;

import java.util.List;

/**
 * Created by hx-pc on 16-4-11.
 */
public class AnalyzeTask {

    public static void analyzeAndExecute(List<MySchedulerTaskEntity> mySchedulerTaskEntityList) {
        mySchedulerTaskEntityList.forEach(schedulerTask -> RestTaskExecute.build().executeHttpType(
                schedulerTask.getHttpType(),
                schedulerTask.getHost(),
                schedulerTask.getUri(),
                schedulerTask.getCronExpression(),
                schedulerTask.getParams()
        ));
    }
}
